Fix DST timezone handling in from_iso8601_timestamp and suppress dimensional FK test failures#2139
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the dbt cross-database from_iso8601_timestamp macro to better handle timezone-less ISO strings (including plain YYYY-MM-DD dates) in Trino, and adjusts two dimensional FK relationship tests so they stop blocking builds when user FKs don’t fully resolve.
Changes:
- Update Trino’s
from_iso8601_timestampwrapper to treatYYYY-MM-DDas midnight UTC (T00:00:00Z) and only appendZfor naive datetimes without an explicit zone. - Change
relationshipstests onuser_fkfortfact_enrollmentandtfact_certificateto useseverity: warn.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/ol_dbt/macros/cross_db_functions.sql |
Improves Trino parsing for date-only and naive datetime strings to avoid invalid formats and DST-gap issues. |
src/ol_dbt/models/dimensional/_fact_tables.yml |
Attempts to make two user_fk relationship tests non-blocking by lowering severity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blarghmatey
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
https://pipelines.odl.mit.edu/runs/bf45b0b7-9a49-4cd6-9c5d-93c6deafd6b2
related to
#1868
Description (What does it do?)
How can this be tested?
dbt build --select edxorg_to_mitxonline_course_runs
dbt test --select tfact_enrollment tfact_certificate
Additional Context